package vo;

import java.sql.Timestamp;

/**
 * SaleorderId entity. @author MyEclipse Persistence Tools
 */

public class SaleorderId implements java.io.Serializable {

	// Fields

	private Integer id;
	private String saleOrderNo;
	private Timestamp saleDateTime;
	private String total;
	private String staffId;

	// Constructors

	/** default constructor */
	public SaleorderId() {
	}

	/** full constructor */
	public SaleorderId(Integer id, String saleOrderNo, Timestamp saleDateTime,
			String total, String staffId) {
		this.id = id;
		this.saleOrderNo = saleOrderNo;
		this.saleDateTime = saleDateTime;
		this.total = total;
		this.staffId = staffId;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getSaleOrderNo() {
		return this.saleOrderNo;
	}

	public void setSaleOrderNo(String saleOrderNo) {
		this.saleOrderNo = saleOrderNo;
	}

	public Timestamp getSaleDateTime() {
		return this.saleDateTime;
	}

	public void setSaleDateTime(Timestamp saleDateTime) {
		this.saleDateTime = saleDateTime;
	}

	public String getTotal() {
		return this.total;
	}

	public void setTotal(String total) {
		this.total = total;
	}

	public String getStaffId() {
		return this.staffId;
	}

	public void setStaffId(String staffId) {
		this.staffId = staffId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof SaleorderId))
			return false;
		SaleorderId castOther = (SaleorderId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getSaleOrderNo() == castOther.getSaleOrderNo()) || (this
						.getSaleOrderNo() != null
						&& castOther.getSaleOrderNo() != null && this
						.getSaleOrderNo().equals(castOther.getSaleOrderNo())))
				&& ((this.getSaleDateTime() == castOther.getSaleDateTime()) || (this
						.getSaleDateTime() != null
						&& castOther.getSaleDateTime() != null && this
						.getSaleDateTime().equals(castOther.getSaleDateTime())))
				&& ((this.getTotal() == castOther.getTotal()) || (this
						.getTotal() != null && castOther.getTotal() != null && this
						.getTotal().equals(castOther.getTotal())))
				&& ((this.getStaffId() == castOther.getStaffId()) || (this
						.getStaffId() != null && castOther.getStaffId() != null && this
						.getStaffId().equals(castOther.getStaffId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37
				* result
				+ (getSaleOrderNo() == null ? 0 : this.getSaleOrderNo()
						.hashCode());
		result = 37
				* result
				+ (getSaleDateTime() == null ? 0 : this.getSaleDateTime()
						.hashCode());
		result = 37 * result
				+ (getTotal() == null ? 0 : this.getTotal().hashCode());
		result = 37 * result
				+ (getStaffId() == null ? 0 : this.getStaffId().hashCode());
		return result;
	}

}